- content_for :title do
  = t('.title')

- content_for :section_title do
  = t('.title')

- content_for :section_rightpanel do
  a.btn.btn-icon.bg-green href="#{new_admin_backup_path}"
    i.icon.far.fa-plus-square
    = t('.new_backup')

.row
  .col-md-12
    - unless @backups.empty?
      .card
        .card-body.p-0
          table.table.backups
            thead
              tr
                th = t('.key')
                th = t('.scopes')
                th = t('.schedule')
                th = t('.next_schedule_at')
                th = t('.enabled')
                th = t('.action')
            tbody
              - @backups.each do |backup|
                tr
                  td = link_to backup.key, admin_backup_path(backup)
                  td = explan_scopes(backup)
                  td = schedule_to_human(backup.schedule)
                  td = next_schedule_to_human(backup.schedule)
                  td
                    == render 'admin/settings/switch_icon', value: backup.enabled
                  td
                    .btn-group
                      = button_to perform_admin_backup_path(backup), class: 'btn btn-sm run-backup', title: t('.run_now') do
                        i.fas.fa-play-circle
                      = link_to edit_admin_backup_path(backup), class: 'btn btn-sm edit-backup', title: t('.edit') do
                        i.fas.fa-edit
                      = link_to admin_backup_path(backup), class: 'btn btn-sm', title: t('.destroy'), \
                        data: { turbo_method: :delete, turbo_confirm: t('.destroy_confirm', key: backup.key) } do
                        i.fas.fa-trash-alt.text-danger
    - else
      .card.card-outline.card-warning
        .card-header.card-border
          h3.card-title = t('.not_found.title')
        .card-body = t('.not_found.body_html')
